var eventsMgr = require('eventsMgr');
var levelMgr = require('levelMgr');
var nodeMgr = require('nodeMgr');
var soundMgr = require('soundMgr');
var consts = require('consts');
cc.Class({
    extends: cc.Component,

    properties: {
        startTime:cc.Node,
        changeScene:dragonBones.ArmatureDisplay,
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad () {
        let self = this;
        levelMgr.initLevel();//初始化关卡
        nodeMgr.initNode(self.node);
        soundMgr.initSounds();
        window.canMove = -1;
    },
    start () {
        nodeMgr.showChangeScene(function () {
            levelMgr.loadLevel('prefabs/level2',function (err) {
                nodeMgr.hideChangeScene();
                levelMgr.curLevel.startLevel();
            })
        });
    },
    replay(){
        window.location.reload();
    },

    // update (dt) {},
});
